package com.huathy.springbootfirst.firstDemo;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Huathy
 * @date 2021-11-08 23:40
 * @description
 * 以前是这样写的。
 * <bean class="com.huathy.springbootfirst.firstDemo.DemoClass"/>
 */
@Configuration
public class ConfigurationDemo {
    @Bean   //默认单例
    public DemoClass demoClass() {
        return new DemoClass();
    }
}
